package com.beidouapp.manager.impl;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.beidouapp.dao.EngineerMapper;
import com.beidouapp.dao.EngineerPosMapper;
import com.beidouapp.domain.pojo.ChinaData;
import com.beidouapp.domain.pojo.Engineer;
import com.beidouapp.domain.pojo.EngineerPos;
import com.beidouapp.domain.pojo.StatisData;
import com.beidouapp.manager.EngineerManager;

@Repository
public class EngineerManagerImpl implements EngineerManager {
	/*@Autowired
	EngineerMapper engineerMapper;*/
	@Autowired
	EngineerPosMapper engineerPosMapper;

	@Override
	public List<EngineerPos> getEngineerPosList() {
		
		return engineerPosMapper.getEngineerPosList();
	}

	@Override
	public Map<String, Object> getDistributeTotal() {
		return engineerPosMapper.getDistributeTotal();
	}

	@Override
	public List<Engineer> findEngineersByMap(Map<String, Object> params,
			Integer offset, Integer limit) {
		 return engineerPosMapper.findEngineersByMap(new RowBounds(offset, limit), params);
	}

	@Override
	public Integer findEngineersCountByMap(Map<String, Object> params) {
		return engineerPosMapper.findEngineersCountByMap(params);
	}

	@Override
	public void save(Engineer engineer) {
		engineerPosMapper.save(engineer);
		
	}

	@Override
	public void update(Engineer engineer) {
		engineerPosMapper.update(engineer);
		
	}

	@Override
	public Engineer getEngineerById(Integer id) {
		// TODO Auto-generated method stub
		return engineerPosMapper.getEngineerById(id);
	}

	@Override
	public Map<String, Object> getEngineerDetailById(Integer id) {
		return engineerPosMapper.getEngineerDetailById(id);
	}

	@Override
	public Engineer getUserNameByEngineer(String userName) {
		return engineerPosMapper.getUserNameByEngineer(userName);
	}

	@Override
	public List<StatisData> getStatisDataListByMap(
			Map<String, Object> params, Integer offset, Integer limit) {
		
		return engineerPosMapper.getStatisDataListByMap(new RowBounds(offset, limit), params);
	}

	@Override
	public Integer findStatisDataCountByMap(Map<String, Object> params) {
		
		return engineerPosMapper.findStatisDataCountByMap(params);
	}

	@Override
	public List<StatisData> getStatisCityDataByMap(Map<String, Object> params,
			Integer offset, Integer limit) {
		 
		return engineerPosMapper.getStatisCityDataByMap(new RowBounds(offset, limit), params);
	}

	@Override
	public Integer findStatisCityDataCountByMap(Map<String, Object> params) {
		 
		return engineerPosMapper.findStatisCityDataCountByMap(params);
	}

	@Override
	public List<ChinaData> getChinaAllDataList() {
		return engineerPosMapper.getChinaAllDataList();
	}

	@Override
	public List<StatisData> getStatisCityDataByMap(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return engineerPosMapper.getStatisCityDataByMap(params);
	}

	@Override
	public List<ChinaData> getChinaProvinceDataList(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return engineerPosMapper.getChinaProvinceDataList(params);
	}

	@Override
	public List<StatisData> getChinaCityDataList(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return engineerPosMapper.getChinaCityDataList(params);
	}

	@Override
	public Integer getEngineersCountByName(String name) {
		// TODO Auto-generated method stub
		return engineerPosMapper.getEngineersCountByName(name);
	}



}
